FROM golang:alpine AS builder

RUN mkdir /app

WORKDIR /app

COPY ./ ./

ENV GOPROXY https://goproxy.cn,direct

RUN go build main.go


FROM scratch

COPY --from=builder /app/main ./main
COPY --from=builder /app/config.yaml ./config.yaml

CMD ["./main"]
